package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.DynamicSourceInfo;
import com.juyu.miliao.api.domain.vo.DynamicSourceInfoVO;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xuanqicheng
 * @create 2019-21-10:14
 */
@Repository
public class DynamicSourceInfoDao {
    @Autowired
    private SqlSession sqlSession;

    public void addDynamicSourceInfos(List<DynamicSourceInfo> list) {

        sqlSession.insert("addDynamicSourceInfos",list);

    }

    public List<DynamicSourceInfoVO> selectDynamicSourcesByDynamicId(long dynamicId) {
        return sqlSession.selectList("selectDynamicSourcesByDynamicId",dynamicId);
    }
}
